When the text entry gets cleared, emit the "changed" signal
straight away. This avoids a lag when dismissing a search.
https://bugzilla.gnome.org/show_bug.cgi?id=700787
GtkSearchEntryPrivate *priv = GET_PRIV (entry);
const char *str, *icon_name;
gboolean active;
+ gboolean cleared = FALSE;
/* Update the icons first */
str = gtk_entry_get_text (GTK_ENTRY (entry));
{
icon_name = NULL;
active = FALSE;
+ cleared = TRUE;
}
else
{
if (priv->in_timeout)
return;
+ /* Don't emit the signal in a timeout if we've cleared
+ * the entry, we don't want a delay */
+ if (cleared)
+ return;
+
/* Queue up the timeout */
reset_timeout (entry);
g_signal_stop_emission_by_name (entry, "changed");